package priv.yiyuan.example.design.proxy;

/**
 * 微信支付
 * <p>
 * 策略模式-具体策略
 *
 * @author YiYuan
 * @data 2025/9/25
 * @apoNote
 */
public class WechatPaymentStrategy implements PaymentStrategy {

    private String openId;

    public WechatPaymentStrategy(String openId) {
        this.openId = openId;
    }

    @Override
    public void pay(double amount) {
        System.out.println("[微信支付策略] 正在使用微信账户 " + openId + " 支付 " + amount + " 元。");
        System.out.println("[微信支付策略] 支付成功。");
    }
}
